package com.neutech.factorial;

public class FactorialTest {
    public static void main(String[] args) {
        //  计算10!
        System.out.println(factorial(25));
    }

    public static long factorial(int n) {
        // 递归头     前n项积
        if (n == 1) {
            return 1;
        }
        return n * factorial(n - 1);
    }
}
